import request from '@/utils/request';

export function getList(params) {
    return request('/api/oa/v1/myattendance/getattendancerecord', {
        method: 'POST',
        data: params
    });
}

export function getRecordList(params) {
    return request('/api/oa/v1/myattendance/getattendancedetail', {
        method: 'POST',
        data: params
    });
}
/**
 * 出勤记录导出接口
 */

export async function attendExport(params) {
    // 连接LYH 本机 调试文件下载
    return request(
        '/api/oa/v1/attendancecountexport/getattendancerecordexport',
        {
            method: 'POST',
            data: params,
            getResponse: true,
            encryption: false,
            isFile: true,
            responseType: 'blob',
            headers: { 'Content-Type': 'application/json' }
        }
    );
}
/**
 * 打卡记录导出接口
 */
export async function attendClockexport(params) {
    // 连接LYH 本机 调试文件下载
    return request(
        '/api/oa/v1/attendancecountexport/getattendancedetailexport',
        {
            method: 'POST',
            data: params,
            getResponse: true,
            encryption: false,
            isFile: true,
            responseType: 'blob',
            headers: { 'Content-Type': 'application/json' }
        }
    );
}
/**
 * 加班统计月统计导出接口
 */
export async function attendMonthexport(params) {
    // 连接LYH 本机 调试文件下载
    return request('/api/oa/v1/attendancecountexport/getovertimecountexport', {
        method: 'POST',
        data: params,
        getResponse: true,
        encryption: false,
        isFile: true,
        responseType: 'blob',
        headers: { 'Content-Type': 'application/json' }
    });
}
/**
 * 加班统计汇总统计导出接口
 */
export async function attendAllexport(params) {
    // 连接LYH 本机 调试文件下载
    return request('/api/oa/v1/attendancecountexport/getsumcountexport', {
        method: 'POST',
        data: params,
        getResponse: true,
        encryption: false,
        isFile: true,
        responseType: 'blob',
        headers: { 'Content-Type': 'application/json' }
    });
}
